The “ Handy - Dandy , Quick - n - Dirty ” Automated Contrast Generator - A SAS / IML R © Macro to Support the GLM , MIXED , and GENMOD Procedures
نویسنده
چکیده
Contrasts are an important component of the armamentarium of the statistician. In the SAS/STAT R © GLM, ANOVA, MIXED, and GENMOD procedures, the contrasts are used to answer specific additional questions. In many cases, it is difficult to define contrasts which are estimable, or correctly formed. A macro which converts a question about differences between cells (defined in several ways) into estimable contrasts is described. This macro uses SAS/IML R © to convert the comparison into the various components of the comparison into SAS R © system contrasts. Using several macro components unique to the SAS/IML system, the macro generates contrasts which are invariably estimable. INTRODUCTION The SAS R © System offers a very complete set of procedures for the applied experimental statistician. From the basic tecniques offered in PROC ANOVA to the workhorse PROC GLM to the sophisticated and contemporarily interesting PROC MIXED and PROC GENMOD, the applied statistician can find useful tools for many experimental situations (note that, although PROC CATMOD is often considered to be one of this set of experimental design tools, it is excluded due to technical differences in the contrast construction methods employed by the CATMOD developers). When using these procedures, the experiment designer generally defines factors or categorical independent variables, and then considers specific hypotheses about the components of the experiment. Continuous variables can also be included as well. When the statistician considers the design, the factor-based differences between cells are usually of paramount importance. If we have an experiment involving two solutions (Factor S) and three concentrations of each (Factor C), we are usually interested in the differences between the levels of Factor S, the differences between the levels of Factor C, and the interaction between the two factors. These factors are tested using either a ratio of variance estimates or an estimated factor test (in PROC MIXED and PROC GENMOD). After examining tests for factors and interactions, further investigations are often needed to clarify matters. In the experiment involving the two solutions and three concentrations, further investigations may be needed to understand a significant interaction. These further questions are answered using contrasts. Here is an example of several contrasts. GA has 2 levels, GA has 3 levels, GA has 4 levels, so that the design has 24 cells (and all cells are represented). PROC GLM; CLASSES GA GB GC; MODEL DV=GA GB GC GA*GB; CONTRAST "GA Overall" GA 1 -1; CONTRAST "GB L1 V L2" GB 1 -1 0; CONTRAST "GC L2 V L3" GC 0 -1 1 0; CONTRAST "GB L1 V L3, GA:1" GC 1 0 -1 0 0 0; RUN; These contrasts are quite typical. In some cases, the contrasts are synonymous with other components of the design. In the example above, “GA Overall” is synonymous with the overall GA effect from the design as given. The other contrasts ask questions which cannot be addressed using standard design components. Thus, the applied statistician must understand contrasts to fully examine all relevant questions in most experimental design situations. 1 Statistics and Data Analysis SUGI 31
منابع مشابه
Computation of pvalues for Multiple Comparisons with a Control in the SAS System
In statistics, multiple comparison procedures (MCP) to compare several means of a treatment are widely used. However, the computations of p-values for MCPs can be complex. In this paper, we discuss and generalize the algorithm used for computations of pvalues for multiple comparisons with a control (MCC) in the SAS system. The limitations of the algorithm will also be discussed. Currently, besi...
متن کاملComparison of Features and Applications of four Linear Models Procedures
Development of SAS ® linear models procedures over the past several years has led to a number of easily accessible methodological statistical advances for experimental data analysis. The original linear models program, GLM, was a fixed model procedure for analysis of normally distributed data with homogeneous variances. The GENMOD procedure extended the fixed linear model analysis to a number o...
متن کاملThe Evolution of Linear Models in SAS: A Personal Perspective
Phenomenal growth in computational power from 1970 through 2010 enabled a parallel expansion in linear model methodology. From humble beginnings in agriculture, linear model applications are now essential in sciences of genetics, education, and biostatistics, to name a few. Indeed, the meaning of "linear models" has evolved accordingly. Developers at SAS Institute have been in the forefront of ...
متن کاملSUGI 28: Estimating Standard Errors for CLASS Variables in Generalized Linear Models Using PROC IML
Analysts who work frequently with linear models using the SAS System often use the LSMEANS statement in PROC GLM or PROC MIXED to obtain “adjusted means.” The absence of a clear analogue to these least-squares means for nonlinear or generalized linear models can be an obstacle for both the analyst and the eventual audience of the analysis. This paper shows how to use PROC IML to estimate standa...
متن کاملModel Fitting in PROC GENMOD
There are several procedures in the SAS System for statistical modeling. Most statisticians who use the SAS system are familiar with procedures such as PROC REG and PROC GLM for fitting general linear models. However PROC GENMOD can handle these general linear models as well as more complex ones such as logistic models, loglinear models or models for count data. In addition, the main advantage ...
متن کامل